package com.qk.mapper;

import com.qk.entity.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper {
    List<Role> selectByCondition(String name, String label);
    //删除角色
@Delete("delete from role where id=#{id}")
    void delete(Integer id);
@Insert("insert into role(name,label,remark,create_time,update_time) values(#{name},#{label},#{remark},#{createTime},#{updateTime})")
    void insert(Role role);
@Select("select * from role where id= #{id}")
    Role SelectById(Integer id);

    void update(Role role);
@Select("select * from role")
    List<Role> select();
}
